package com.whmall.service.crm.enumeration;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 客户池跟进状态
 * @author xiangzhou
 * @since 2019-8-9 18:03:02
 */
@Getter
@RequiredArgsConstructor
public enum CustomerFollowStatusEnum {


    /** 待跟进 */
    DEFAULT(0, "客户池跟进状态 - 未知"),

    /** 待跟进 */
    TO_BE_FOLLOWED(1, "待跟进"),
    /** 已跟进 */
    FOLLOWED(2, "已跟进"),
    /** 已下单 */
    HAS_ORDER(3, "已下单"),
    /** 已释放 */
    RELEASED(4, "已释放")
    ;

    private final Integer value;
    private final String name;


    public static CustomerFollowStatusEnum fromValue(int value) {
        for (CustomerFollowStatusEnum e : values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return DEFAULT;
    }

}

